<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);" action="<c:url value='/game/index'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left;line-height: 25px;">
                    <label>组名：</label>
                    <input name="keywords" type="text" value="${query.keywords}"/>
                </li>
                <li>
                    <div class="buttonActive" style="margin-left:5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="padding-top: 1px;">
    <div class="panelBar">
        <ul class="toolBar" style="float: left;display: inline-block;">
            <li><a class="add" href="<c:url value='/game/add'/>"  target="dialog" width="580" height="180" mask="true" resizable="false"
                   maxable="false" rel="os_game_add" title="添加游戏组"><span>添加游戏组</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="114">
        <thead>
        <tr>
            <th width="40" align="center">序号</th>
            <th width="">组名</th>
            <th>组员</th>
            <th width="40">得分</th>
            <th width="160">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="game" items="${pager.list}" varStatus="vs">
            <tr>
                <td>${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
                <td>${game.name}</td>
                <td>${game.zy}</td>
                <td>
                    <c:if test="${game.score eq '' || game.score eq null}">0</c:if>
                    <c:if test="${game.score ne '' && game.score ne null}"> ${game.score}</c:if>

                </td>
                <td style="text-indent: 3px;">
                    <a href="<c:url value='/game/view/${game.dbid}'/>" target="dialog" width="580" height="180" mask="true" resizable="false"
                       maxable="false" rel="os_game_add" title="编辑">编辑</a>&nbsp;

                    <a class="delete" href="<c:url value='/game/${game.dbid}'/>" title="确认删除游戏组【${game.name}】？"
                       target="ajaxDel">删除</a>
                    <a href="<c:url value='/game/points/${game.dbid}'/>" target="dialog" rel="page_game_points"
                       width="300" height="180" mask="true"
                       resizable="false" maxable="false" title="【${game.name}】加分">加分</a>&nbsp;
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
             pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/game/index'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
    </form>
</div>

